import { request, config } from 'utils'

const { api } = config
const { basicDataList, basicDataListAll, basicDataAdd, basicDataEdit, basicDataQuery, basicDataDel, basicDataMultiDel } = api
const { basicDataAvailable } = api

export async function list (params) {
  return request({
    url: basicDataList,
    method: 'post',
    data: params,
  })
}

export async function listall (params) {
  return request({
    url: basicDataListAll,
    method: 'post',
    data: params,
  })
}

export async function query (params) {
  return request({
    url: basicDataQuery,
    method: 'put',
    data: params,
  })
}


export async function create (params) {
  return request({
    url: basicDataAdd,
    method: 'post',
    data: params,
  })
}

export async function update (params) {
  return request({
    url: basicDataEdit,
    method: 'put',
    data: params,
  })
}
export async function remove (params) {
  return request({
    url: basicDataDel,
    method: 'delete',
    data: params,
  })
}

export async function patchremove (params) {
  return request({
    url: basicDataMultiDel,
    method: 'delete',
    data: params,
  })
}

export async function setAvailable (params) {
  return request({
    url: basicDataAvailable,
    method: 'put',
    data: params,
  })
}

